<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>支付结果查询中....</title>

<script type="text/javascript" src="/static/index/jquery.min.js" charset="UTF-8"></script>


<script src="/static/aicaipay/resouce/js/jquery.min.js"></script>
<script src="//cdn.bootcss.com/layer/2.3/layer.js"></script>

<style type="text/css" media="all">
      #dg .item{
      line-height: 34px;
      height: 34px;
      padding: 0 10 0 10;
      margin: 0 10px;
      text-align: center;
      display: block;
      /*color: #FFF;*/
    }
     .btn {
   
      width: auto;
      border: none;
      border-radius: 5px;
      float: left;
      display: block;
      overflow: hidden;
      padding: 0 9px;
      line-height: 24px;
      font-size: 17px;
      font-weight:bold;
    }
</style>

</head>

<body  >

<h2 id="" style="font-size:40px;color:red;text-align:center;">支付成功后,请等待3-10秒钟,自动跳转播放界面</h2>
   
 <a href="<?php echo $liebiao['bei_url']?>" style="margin-top:40%;background-color:#CC0033;border-radius:6px;width:100%;font-size:50px;display:block;color:yellow;text-align:center;height:100px;line-height:100px">已支付长时间无反应请点击已购查看</a> 
 
<a href="<?php echo $liebiao['bei_url']?>" style="margin-top:50px;background-color:#CC0033;border-radius:6px;width:100%;font-size:50px;display:block;color:yellow;text-align:center;height:100px;line-height:100px">点击返回首页</a>

<form name="form1" id="form1" method="get"  action="{$turl}">

  <input   name="uopenid" type="hidden" value="{$uopenid}"> 
  <input   name="xianlu" type="hidden" value="{$xianlu}"> 
  <input   name="ddh" type="hidden" value="{$ddh}"> 
  <input   name="zyid" type="hidden" value="{$zyid}"> 

  <input name="submit" id="submit" type="submit"   style="display:none" value="正在提交中，请稍后！" />
</form>

<script type="text/javascript">
 document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
       
    });
    
       function order() {
        var url = "{$turl}";
      
        var billNo = "{$ddh}";
        var uopenid = "{$uopenid}";
        var xianlu = "{$xianlu}";
        var zyid = "{$zyid}";
        
        $.get("{:url('pay/checkorder')}",{billNo:billNo}, function (result) {
            
            // //成功
            // alert(billNo);
            // alert(result.code);
            if (result.code == 1) {
                //回调页面
                window.clearInterval(orderlst);
                
                location.href = url+"?uopenid="+uopenid+"&ddh="+billNo+"&zyid="+zyid;
                
                setTimeout(function () {
                    location.href = url+"?uopenid="+uopenid+"&ddh="+billNo+"&zyid="+zyid;
                }, 500);
            }
        });
    }
    var orderlst = setInterval("order()", 1000);
    
    

// function getform(){
 
//     document.getElementById("submit").click();
 
// }
// getform()
// setTimeout(getform,0);//以毫秒为单位的.1000代表一秒钟.根据你需要修改这个时间.
 </script>
 
</body>

</html>
